package com.dmz.workflow.wrapper;

import com.echronos.system.feign.IRoleFeign;
import com.echronos.system.req.QueryRoleMemberListReq;
import com.echronos.system.resp.MemberResp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Collections;
import java.util.List;

@Component
public class RoleFeignWrapper {

    @Autowired
    private IRoleFeign roleFeign;

    public List<MemberResp> queryRoleAllMember(Integer roleId, Integer companyId) {
        QueryRoleMemberListReq queryRoleMemberListReq = new QueryRoleMemberListReq();
        queryRoleMemberListReq.setRoleId(roleId);
        queryRoleMemberListReq.setCompanyId(companyId);
        return roleFeign.queryRoleAllMember(Collections.singletonList(queryRoleMemberListReq));
    }

}
